<?php
define('APPVWIKI','1.00');
/************************************************************************/
/* FrameWork  test preview                                              */
/* ==================================================================== */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

global $lang;
$lang=lang();

$action=$_GET['action'];
$page=$_GET['page'];

//__________________________________________________________________________________________________________________________________

?>
<?php structure_openBlock("table appl",apptitle($appname),""); ?>
<p>

<?php



if(!file_exists("datas/applications/".apptitle($appname)))
    mkdir("datas/applications/".apptitle($appname),0755);
if(!file_exists("datas/applications/".apptitle($appname)."/pages"))
    mkdir("datas/applications/".apptitle($appname)."/pages",0755);
if(!file_exists("datas/applications/".apptitle($appname)."/history"))
    mkdir("datas/applications/".apptitle($appname)."/history",0755);
if(!file_exists("datas/applications/".apptitle($appname)."/images"))
    mkdir("datas/applications/".apptitle($appname)."/images",0755);


switch($action){

    case "search":
	include "$path/$appname/search.inc";
    case "link":
	include "$path/$appname/list.inc";
	break;
    case "list":
	include "$path/$appname/list.inc";
	break;
    case "diff":
	include "$path/$appname/diff.inc";
	break;
    case "view":
	include "$path/$appname/diff.inc";
	break;
    case "edit":
	include "$path/$appname/editor.inc";
	break;
    case "admin":
	include "$path/$appname/admin.inc";
	break;
    default:
	include "$path/$appname/viewer.inc";
	break;
    break;
    }
?>
</p>
<?php structure_closeBlock(); ?>


